
namespace Patterns4Net.Attributes.DesignPatterns
{
    using System;

    /// <summary>
    /// Use this attribute to annotate a type as an implementation of the Proxy design pattern.
    /// </summary>
    [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)]
    public class ProxyAttribute : Attribute, IPatternAttribute
    {
        /// <summary>
        /// Gets or sets the interface, which this Proxy implements.
        /// </summary>
        public Type Subject { get; set; }

        /// <summary>
        /// Gets or sets the interface, which is wrapped in this proxy. 
        /// This value can be left null if the real subject is not a C# class or interface, 
        /// or if the <see cref="Subject"/> and <see cref="RealSubject"/> are same.
        /// </summary>
        public Type RealSubject { get; set; }
    }
}
